package yns.springboot.guide.demo.service.mybatis.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import yns.springboot.guide.demo.data.db.mybatis.dao.UserMapperXMLByMybatis;
import yns.springboot.guide.demo.entity.UserEntity;
import yns.springboot.guide.demo.service.mybatis.UserServiceXMLByMybatis;

@Service
public class UserServiceXMLByMybatisImpl implements UserServiceXMLByMybatis {

	@Autowired
	private UserMapperXMLByMybatis userMapperXML;
	
	public List<UserEntity> getUser(){
		return userMapperXML.getUser();
	}

	@Override
	public void addUser(UserEntity userEntity) {
		userMapperXML.addUser(userEntity);
		
	}

	@Override
	public void deleteUser(int id) {
		userMapperXML.deleteUser(id);
		
	}

	@Override
	public void updateUser(UserEntity userEntity) {
		userMapperXML.updateUser(userEntity);
		
	}
	
	@Override
	public int getID() {
		return userMapperXML.getID();
		
	}
}
